fix(ci): use github.token instead of secrets.GITHUB_TOKEN for gh CLI#51
Merged
fix(ci): use github.token instead of secrets.GITHUB_TOKEN for gh CLI#51
Conversation
The gh CLI in GitHub Actions requires GH_TOKEN to be set to github.token rather than secrets.GITHUB_TOKEN. This was causing the release workflow to fail with exit code 4 when attempting to create draft releases. Fixes the error: "gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable." Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.tokeninstead ofsecrets.GITHUB_TOKENfor theGH_TOKENenvironment variable in the draft release creation stepRoot Cause
The GitHub CLI (
gh) requiresGH_TOKENto be set togithub.tokenin GitHub Actions workflows. Usingsecrets.GITHUB_TOKENcaused the workflow to fail with exit code 4:Test Plan
Fixes https://github.com/pinecone-io/pinecone-mcp/actions/runs/21404698668
Note
Low Risk
Single-line CI/workflow change limited to GitHub release automation; minimal blast radius outside the release job.
Overview
Fixes the GitHub Actions release workflow by changing the
GH_TOKENenv var for thegh release createstep fromsecrets.GITHUB_TOKENtogithub.token, preventing draft release creation failures during prod releases.Written by Cursor Bugbot for commit 2cefae0. This will update automatically on new commits. Configure here.